package com.dapao.mapper;

import com.dapao.pojo.Time;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TimeMapper {
    @Insert("insert into `match`.time_slot(user_id, start_time, end_time) VALUES (#{userId}, #{startTime}, #{endTime})")
    void addTimeSlot(Time timeSlot);

    @Select("select * from `match`.time_slot")
    List<Time> getAllTimeSlots();
}
